package com.xbongbong.saas.domain.dao;/*/*/

import com.xbongbong.saas.domain.entity.WorkOrderExplainEntity;
import com.xbongbong.saas.domain.entity.ext.WorkOrderExplainEntityExt;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 *
 * @author 魏荣杰
 * @date 2019/3/12 11:02
 * @since v1.0
 * @version v1.0
 */
@Repository
@Mapper
public interface WorkOrderExplainDao {

    Integer insert(WorkOrderExplainEntity entity);

    Integer update(WorkOrderExplainEntity entity);

    List<WorkOrderExplainEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    Integer deleteByFormId(@Param("formId") Long formId, @Param("corpid") String corpid);

    WorkOrderExplainEntityExt getByFormId(@Param("formId") Long formId, @Param("corpid") String corpid);

    WorkOrderExplainEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    /**
     * 批量插入实体
     * @param list
     * @return 返回数据的列表
     */
    Integer insertBatch(@Param("list") List<WorkOrderExplainEntity> list);

    Integer updateBatch(@Param("list") List<WorkOrderExplainEntity> workOrderExplainEntityList, @Param("corpid") String corpid);
    /**
     * 批量删除
     * @param list 主键id集合
     * @param corpid
     * @author xingxing.xiao
     */
    Integer deleteBatch(@Param("list") List<Long> list, @Param("corpid") String corpid);


    void updateBatchExplain(@Param("list") List<WorkOrderExplainEntity> updateList, @Param("corpid") String corpid);

    void updateBatchExplainNoCorpid(@Param("list") List<WorkOrderExplainEntity> updateList);
}
